<div class="container">
  <page-header title="Admin">
  </page-header>

  <div class="bg-white tiled">
    <ul class="tab-nav">
      <li class="active"><a href="admin/status">System Status</a></li>
      <li><a href="admin/queries/tasks">Queries Queue</a></li>
      <li><a href="admin/queries/outdated">Outdated Queries</a></li>
    </ul>


    <div class="row p-15">
      <ul class="list-group p-l-15 col-lg-4">
        <li class="list-group-item active">General</li>
        <li class="list-group-item" ng-repeat="(name, value) in status">
          <span class="badge">{{value}}</span>
          {{name | toHuman}}
        </li>
      </ul>

      <ul class="list-group col-lg-4">
        <li class="list-group-item active">Manager</li>
        <li class="list-group-item">
          <span class="badge" am-time-ago="manager.last_refresh_at*1000.0"></span>
          Last Refresh
        </li>
        <li class="list-group-item">
          <span class="badge" am-time-ago="manager.started_at*1000.0"></span>
          Started
        </li>
        <li class="list-group-item">
          <span class="badge">{{manager.outdated_queries_count}}</span>
          Outdated Queries Count
        </li>
      </ul>

      <ul class="list-group col-lg-4">
        <li class="list-group-item active">Queues</li>
        <li class="list-group-item" ng-repeat="(name, value) in manager.queues">
          <span class="badge">{{value.size}}</span>
          {{name}} <span uib-popover="{{value.data_sources}}" popover-trigger="'mouseenter'"><i class="fa fa-question-circle"></i></span>
        </li>
      </ul>
    </div>

  </div>
</div>
